<template>
	<view>
	
			<view class="wrapper">
				<view class="fill_header">
					<view class="fill_header_title">提醒</view>
				<view class="fill_info_cont clearfix remind" v-if="datainfo.msg != '' ">{{ datainfo.msg }}</view>
				</view>
				
				<view class="cont">
					<view class="fill_info_line">
						<view class="fill_info_title">激活账号</view>
						<view class="fill_info_cont clearfix">
							<input  type="text" v-model="submitInfo.username" placeholder="请输入会员账号" ></input>
							
							</view>
					</view>
				</view>
				<view class="submit_btn_cont"><button :class="notcansubmit ? 'nosubmit_btn' :'submit_btn'" @click="submit" :disabled="notcansubmit ">提交</button></view>
			</view>
	
	</view>
</template>

<script>
export default {
	data() {
	
		return {
			submitInfo: {},
				notcansubmit:false,
			datainfo: {msg:''}
		};
	},

	onLoad() {
		this.getInfo();
	},

onPullDownRefresh() { // 下拉监听事件
        this.getInfo();
        setTimeout(function () {
            uni.stopPullDownRefresh();
        }, 1000);
    },



	computed: {
		
	},
	methods: {
		getInfo(e) {
			var self = this;
			this.$api.http.get('assistance/index/activeUserInfo').then(res => {
				
					self.datainfo.msg  = res.msg;
			
				
			});
		},

		submit() {
			
			
			var self = this;
		if(!self.submitInfo.username)
			{
				self.$api.msg("请输入要激活的用户名");
				return false;
			}
			self.notcansubmit = true; //禁用按钮
			self.$api.http.post('assistance/index/activeUser',self.submitInfo).then(res => {
			
					self.$api.msg(res.msg);
						self.notcansubmit = false; //启用按钮
			
		
			
			});
		}
	}
};
</script>

<style lang="scss">
.remind {
	color: #F1C013;
	font-size: 26upx;
}

.clearfix {
	zoom: 1;
	display: block;
}

.noShow {
	display: none;
}

.clearfix:after {
	content: '.';
	visibility: hidden;
	display: block;
	height: 0;
	clear: both;
}



	.wrapper {
		
		background-color: #f5f5f5;
		height: 100vh;
		padding: 20upx;
		
		.fill_header {
			border-radius: 5upx;
			background-color: #ffffff;
			padding: 40upx;
			margin-bottom: 20upx;
			.fill_header_title {
				font-size: 26upx;
			}
			.fill_header_cont {
				margin-top: 30upx;
				.photo_img_cont {
					border: 1upx solid hsla(0, 0%, 60%, 0.3);
					width: 120upx;
					height: 120upx;
					padding: 20upx;

					.photo_img {
						width: 80upx;
						height: 80upx;
					}
				}
			}
		}

		.cont {
			border-radius: 5upx;
			background-color: #ffffff;
			padding: 40upx;

			.fill_info_line {
				margin-top: 30upx;

				.fill_info_title {
					font-size: 26upx;
				}

				.fill_info_cont {
					position: relative;
					border-bottom: 1upx solid hsla(0, 0%, 60%, 0.3);

					.pwdInput {
						font-size: 26upx;
						height: 80upx;
						line-height: 80upx;
						border: none;
						display: block;
						outline: none;
					}

					.pwd_icon {
						width: 85upx;
						height: 85upx;
						-webkit-transform: scale(0.4);
						transform: scale(0.4);
						position: absolute;
						top: 0;
						right: 0;
					}
				}
				.fill_info_another {
					border-bottom: 1upx solid hsla(0, 0%, 60%, 0.3);
					margin-top: 24upx;
					label {
						font-size: 14upx;
					}
				}
				.checkbox_line {
					padding: 0 0px 14px;
					.uni-input {
						text-indent: 0;
						background: #ffffff;
					}
				}
			}

			.fill_info_line:first-child {
				margin-top: 0;
			}
		}
	}

	.submit_btn_cont {
		margin-top: 20upx;

		.submit_btn {
			border-radius: 5upx;
			color: #ffffff;
			font-size: 26upx;
			background: linear-gradient(90deg, #4e8cff, #2f79ff);
		}
		
		.nosubmit_btn {
			border-radius: 5upx;
			color: #ffffff;
			font-size: 26upx;
			background: linear-gradient(90deg, #C6C5C5, #CDCED0);
		}
	}

</style>
